const Home = () =>
    import('@/pages/home')
const findProject = () =>
    import('@/pages/findProject')
const Pages1 = () =>
    import('@/pages/pages1/pages1')
const Pages4 = () =>
    import('@/pages/pages1/pages4')
const suibian = () =>
    import('@/pages/suibian')
    const error404 = () =>
    import('@/pages/404/404.vue')
export const router = {
    namespaced: true,
    state: {
        typeA: [{
                path: '/',
                name: 'Home',
                component: Home,
                redirect: "/page2",
                children: [{
                        path: '/page2',
                        name: '第二页page2',
                        component: findProject
                    },
                    {
                        path: '/pages4',
                        name: '第四页page4',
                        component: Pages4
                    },
                    {
                        path: '/suibian',
                        name: 'pags3',
                        component: suibian
                    },

                ]
            },
            {
                path: '/404', // 此处需特别注意至于最底部
                component: error404,
            }
        ],
        typeB: [{
                path: '/',
                name: 'Home',
                component: Home,
                redirect: '/Pages1',
                children: [{
                    path: '/Pages1',
                    name: '第一页pags1',
                    component: Pages1
                }, {
                    path: '/pages4',
                    name: '第四页page4',
                    component: Pages4
                }, ]
            },
            {
                path: '/404', // 此处需特别注意至于最底部
                component: error404,
            }
        ],
        typeC: [{
            path: '/',
            name: 'Home',
            component: Home,
            redirect: '/page2',
            children: [{
                    path: '/page2',
                    name: '第二页page2',
                    component: findProject
                }, {
                    path: '/Pages1',
                    name: '第一页pags1',
                    component: Pages1
                },
                {
                    path: '/suibian',
                    name: 'pags3',
                    component: suibian
                },
            ]
        }, {
            path: '/404', // 此处需特别注意至于最底部
            component: error404,
        }],
    },
    mutations: {
        test(state) {
            // 变更状态
            console.log(`模块router test`)
            console.log(state)
        }
    }
}
